<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<s:if test="type==1">
	<title>个人贷款审查</title>
	<span id="navlink">贷款审批 >> 个人贷款审查</span>
</s:if>
<s:elseif test="type==2">
	<title>企业贷款审查</title>
	<span id="navlink">贷款审批 >> 企业贷款审查</span>
</s:elseif>

<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/creditCheck/creditExamine.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/creditCheck/creditInformation.js"></script>
<form id="form" action="creditExamineAction" method="post">
<s:hidden name="type" value="%{#request.type}" />
<s:hidden name="appid" value="%{creditCheckBean.applyid}"/>
<s:hidden name="canUseMoney" id="canUseMoney" value="%{#request.canUseMoney}"/>
<s:hidden name="applyMoney" id="applyMoney" value="%{creditCheckBean.applyMoney}"/>
<s:div id="left_area" cssClass="readonly">
	<s:if test="type==1">
		<th>申请单号:<span>RFG</span>
			<s:text name="%{creditCheckBean.applyid}" />
		</th>
	</s:if>
	<s:elseif test="type==2">
		<th>申请单号:<span>RFQ</span>
				<s:text name="%{creditCheckBean.applyid}" />
		</th>
	</s:elseif>

</s:div>
<s:div id="top_area" cssClass="readonly">
	<th>申请日期:<s:text name="f.date.ymd">
			<s:param value="%{creditCheckBean.applyDate}" />
		</s:text>
	</th>
</s:div>
<s:div id="record">
	<br>
	<table class="table_box table_all_border">
			<tr>
				<th>操作类型</th>
				<th>结果</th>
				<th>意见</th>
				<th>操作人员</th>
				<th>调查报告</th>
				<th>操作日期</th>
			</tr>
			<s:iterator value="recordList" status="index" var="var">
				<tr>
					<td>${checktype }</td>
					<td>${result }</td>
					<td>${opinion }</td>
					<td>${managerid }</td>
					<s:if test="result==null&&checktype=='调查'">
						<td><a href="${docpath }" target="_blank">点击查看文件</a></td>
					</s:if><s:else>
						<td></td>
					</s:else>
					<td><s:text name="f.date.ymd">
							<s:param value="%{dodate}" />
						</s:text></td>
				</tr>
			</s:iterator>
		</table>
</s:div>
<br>
<hr>
<br>
<s:if test="isCanChange==1">
<table class="table_box table_all_border">
			<tr>
				<th><span class="need">*</span>审查结果</th>
				<td><select name="setcheckstate" id="setcheckstate">
						<option value="">---请选择审查结果---</option>
						<option value="1">同意</option>
						<option value="2">不同意</option>
				</select>
				</td>
			</tr>
			<tr>
				<th>审查意见</th>
				<td><s:textarea name="setopinion" id="setopinion" value="" cols="50"
						rows="5" />
				</td>
			</tr>
		</table>

<br>
</s:if><s:elseif test="isCanChange==2">
	<table class="table_box table_all_border">
			<tr>
				<th>回退意见</th>
				<td><s:textarea name="setopinion" id="setopinion" value="" cols="50"
						rows="5" />
				</td>
			</tr>
		</table>
</s:elseif>
<%-- <s:div id="right_area">
		<a href="creditSurveyAction!getOneEdit?type=${type }&appid=${creditCheckBean.applyid}">修改申请信息</a>
	</s:div> --%>
<table class="table_box table_all_border">
	<tr>
		<th><b>客户名称</b></th>
		<s:if test="type==1">
			<%-- <td><a target="_blank" href="../custom/personalAction!personalShow?id=${creditCheckBean.clientid}&PFLAG=BASIC&FLAG=onlyRead"><s:text name="%{creditCheckBean.customName}" /></a> --%>
			<td><a target="_blank" href="../custom/personalAction!personalShow?id=${creditCheckBean.clientid}&PFLAG=BASIC"><s:text name="%{creditCheckBean.customName}" /></a></td>
		</s:if>
		<s:elseif test="type==2">
			<td><a target="_blank" href="../custom/customShow!companyshow?id=${creditCheckBean.clientid}"> <s:text
						name="%{creditCheckBean.customName}" /> </a>
			</td>
		</s:elseif>
	</tr>
	<tr>
		<th><b>申请金额</b>
		</th>
		<td id="applyMoney"><s:text name="f.money">
				<s:param value="creditCheckBean.applyMoney" />
			</s:text></td>
	</tr>
	<s:if test="isCanChange==1">
		<tr>
		<th><b>可用授信金额</b>
		</th>
		<s:if test="canUseMoney==0">
			<td id="canUseMoney"><s:text name="f.money">
				<s:param value="0"/>
			</s:text></td>
		</s:if><s:else>
		<td id="canUseMoney"><s:text name="f.money">
				<s:param value="%{#request.canUseMoney}" />
			</s:text></td>
		</s:else>
	</tr>
	</s:if>
	<tr>
		<th>贷款期限</th>
		<th align="left"><s:text name="%{creditCheckBean.applyTime}"/>
			<s:text name="%{creditCheckBean.applyTimeType}"/></th>
	</tr>
	<tr>
		<th>贷款类型</th>
		<s:if test="type==1">
			<th><a target="_blank" href="javascript:void(0);"
				id="personalTypeHref"><s:text
						name="%{creditCheckBean.applyTypeStr}" /> </a>
			</th>
		</s:if>
		<s:elseif test="type==2">
			<th><a target="_blank" href="javascript:void(0);"
				id="enterpriseTypeHref"><s:text
						name="%{creditCheckBean.applyTypeStr}" /> </a>
			</th>
		</s:elseif>
	</tr>
	<tr>
		<th>基准利率</th>
		<td><s:text name="%{creditCheckBean.applybaserate}"/>%</td>
	</tr>
	<tr>
		<th>浮动比例</th>
		<td id="slidingscale"></td>
	</tr>
	<tr>
		<th>执行利率</th>
		<td><s:text name="%{creditCheckBean.performrates}"/>%</td>
	</tr>
</table>
<s:if test="isCanChange==1">
<s:div id="button_area">
	<s:submit value="确定" method="doExamine" id="submit"/>
	<input type="button" value="取消" onclick="javascript:history.go(-1);" />
</s:div>
</s:if><s:elseif test="isCanChange==2">
	<s:div id="button_area">
	<s:hidden name="setcheckstate" value="3"/>
	<s:submit value="回退" method="doExamine"/>
	<input type="button" value="取消" onclick="javascript:history.go(-1);" />
</s:div>
</s:elseif><s:else>
	<s:div id="button_area">
		<input type="button" value="取消" onclick="javascript:history.go(-1);" />
	</s:div>
</s:else>

</form>
<script type="text/javascript">
	var num=${creditCheckBean.slidingscale};
	calcDifferent(num,"#slidingscale");
</script>
